'Declaration
<ExtensionAttribute()> <NotNullAttribute()> Public Overloads Shared Function PreventRecursion(Of T)( _ ByVal source As ITreeTraversable(Of T), _ ByVal equalityComparer As IEqualityComparer(Of T) _ ) As ITreeTraversable(Of T)
'Usage
Dim source As ITreeTraversable(Of T) Dim equalityComparer As IEqualityComparer(Of T) Dim value As ITreeTraversable(Of T) value = ITreeTraversableExtension.PreventRecursion(Of T)(source, equalityComparer)
[Extension()] [NotNull()] public static ITreeTraversable<T> PreventRecursion<T>( ITreeTraversable<T> source, IEqualityComparer<T> equalityComparer )
[Extension()] [NotNull()] public: static ITreeTraversable<T^>^ PreventRecursiongeneric<typename T> ( ITreeTraversable<T^>^ source, IEqualityComparer<T^>^ equalityComparer )
Parameters
- source
- The tree traversable for which the recursion will be prevented.
- equalityComparer
- The equality comparer to be used for comparing traversed nodes.
Type Parameters
- T
- The type of objects to traverse.
Return Value
Returns a tree traversable where nodes that have already been traversed are returned without their children being traversed again.